


stulist=[
	 {"name":"zhagnsan","cun":2000,"qu":"$1000"},
	 {"name":"lisi","cun":2000,"qu":"$2000"},
	 {"name":"wangwu","cun":2000,"qu":"$3000"}]

def showstu(stulist):
	'''
	客户信息的输出函数
	'''
	if len(stulist) == 0:
		print("没有客户信息可以输出")
		return
	print("|{0:<5}|{1:<10}|{2:<10}|{3:<10}".format("sid","name","cun","qu"))
	print("-"*40)
	for i in range(len(stulist)):
		print("|{0:<5}|{1:<10}|{2:<5}|{3:<5}".format(i+1,stulist[i]["name"],stulsit[i]["cun"],stulsit[i]["qu"]))




while True:

	print("="*12,"自动取款","="*14)
	print("{0:1}{1:13}{2:15}".format(" ","1.查询客户and余额","2.存钱"))
	print("{0:1}{1:13}{2:15}".format(" ","3.取钱","4.退卡"))

	print("="*40)
	key = input("请输入一个键盘值：")
	if key == "1":
		print("客户信息浏览：")
		showstu(stulist)
		input("按回车键继续：")


	elif key == "2":
		print("存钱")
		input("按回车键继续：")
	elif key == "3":
		print("取钱")
		input("按回车键继续：")
	elif key == "4":
		print("再见")
		break

	else:
		print("========无效值！========")
